package nl.mayisal.sql;

import java.sql.SQLException;
import java.util.Properties;

import nl.mayisal.startup.SQLConfig;

public class SQLConnector {
	private final String url;
	private final Properties info;
	
	public SQLConnector() throws SQLException, ClassNotFoundException {
		this.url = SQLConfig.getUrl();
		this.info = SQLConfig.getConnectionProperties();
		Class.forName(SQLConfig.getDriverName());
	}
	
	public SQLConnection getConnection() throws SQLException {
		return new SQLConnection(this.url,this.info);
	}
}
